Before you start running the program in GDB, you need to generate debugging information at compile time.You can start gdb with parameters (if any) in your chosen environment. If you are debugging locally, you can redirect the input output, debug a
Turn from: http://blog.csdn.net/haoahua/article/details/2056854
the original text is from the Chenhao column (http://blog.csdn.net/haoel/), thanks to the author for publishing such a good article.
Debug a program with GDB
Debug the program with
Previously wanted to verify some of the problems on the stack, but there is no good way, printf is really limited, flow on the surface, only the appearance (value, scope, law) do not see the real (address, register, process), so think of gdb--a
GDB Basic Commands This article describes common commands for using the GDB debugger. Main content: [introduction] [Example] [other] [introduction]=============GDB is a powerful UNIX program debugging tool released by the GNU Open source
Enter and exit GDB
This section discusses how to start and exit gdb. Mainly include: input ' gdb ' into the GDB debugger input quit or press ctrl-d exit call GDB: How to start GDB exit GdB: How to exit gdb Shell script command: How to save the
GDB Basic CommandsThis article describes common commands for using the GDB debugger.Main content:IntroductionFor exampleOtherIntroduction=============GDB is a powerful UNIX program debugging tool released by the GNU Open source organization. If you
GDB Basic Commands This article describes common commands for using the GDB debugger.Main content:IntroductionFor exampleOtherIntroduction=============GDB is a powerful UNIX program debugging tool released by the GNU Open source organization. If you
Previously wanted to verify some of the problems on the stack, but there is no good way, printf is really limited, flow on the surface, only the appearance (value, scope, law) do not see the real (address, register, process), so think of gdb--a
GDB commands a lot, this article will not be all introduced, will only introduce some of the most commonly used. Before the introduction, let's introduce a very useful feature in GDB: the completion function. It's just like the commands in the shell
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.